package com.dragee.modules.work.po;

import com.dragee.config.NotNull;
import com.dragee.modules.sys.entity.UserEntity;
import com.dragee.modules.work.entity.UserDeliverEntity;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author tys on 2023/3/31
 */
@Data
@NoArgsConstructor
public class UserDeliverPo {
    public UserDeliverPo(UserEntity po, UserDeliverEntity seller) {
        this.userId = po.getUserId();
        this.name = po.getName();
        this.username = po.getUsername();
        this.password = po.getPassword();
        this.parentId = po.getParentId();
        this.phone = po.getPhone();
        this.sex = po.getSex();
        this.status = po.getStatus();
        this.createBy = po.getCreateBy();
        this.createTime = po.getCreateTime();
        this.address = seller.getAddress();
    }

    private Long userId;
    @NotNull("姓名")
    private String name;
    private Long parentId;
    @NotNull("姓名")
    private String username;
    private String password;
    private String phone;
    private String sex;
    private String status;

    private String address;

    private String createBy;
    private Date createTime;
    private Long sort;

}
